package com.cjm.one.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cjm.one.model.system.entity.SysRole;
import com.cjm.one.model.system.vo.RoleDetailVO;
import com.cjm.one.model.system.vo.RoleResVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author 29289
* @description 针对表【sys_role(角色表)】的数据库操作Mapper
* @createDate 2024-09-05 16:21:14
* @Entity com.one.model.system.entity.SysRole
*/

public interface SysRoleMapper extends BaseMapper<SysRole> {
    //查询用户所属的全部权限
    List<RoleResVo> findUserPermsList(Long userId);
    //根据用户id删除所属角色
    void deleteBySysUserId(Long userId);
    //添加对应用户id的角色信息
    void insertSysUserRoles(Long userId, List<Long> roleIds);


    List<SysRole> selectAllRole();

    RoleDetailVO selectRoleDetail(Long id);
}




